﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ControlTemplate x:Key="ErrorTemplate">
        <DockPanel DataContext="{Binding ElementName=adorner, Path=AdornedElement.(Validation.Errors)/ErrorContent}">
            <Border BorderBrush="Red" BorderThickness="1" >
                <AdornedElementPlaceholder Margin="-1,-1,-1,-1" Name="adorner">
                    <Ellipse x:Name="Ellipse" 
                            Margin="0,0,3,0" 
                            Width="14" Height="14" 
                            VerticalAlignment="Center" 
                            HorizontalAlignment="Right"
                            Fill="Red">
                        <Ellipse.ToolTip>
                            <Border MaxWidth="350">
                                <ContentControl FontSize="14"  Content="{Binding}"/>
                            </Border>
                        </Ellipse.ToolTip>
                    </Ellipse>
                </AdornedElementPlaceholder>
            </Border>
        </DockPanel>
    </ControlTemplate>
    <Style TargetType="TextBox">
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ErrorTemplate}" />
    </Style>
</ResourceDictionary>